angular.module('mamApp').factory('noticeManager', ['$http','api', function ($http,api) {
    var noticeManager = {
        /**
         * 获取公告信息列表
         * @param params
         * @returns
         */

        noticeList: function (pageNo,pageSize) {
            return $http.get(api + '/cp/notices/' + pageNo +'/'+ pageSize).then(function (result) {
                return result;
            });
        },
        /**
         * 获取单个公告
         * @param params
         * @returns result
         */
        noticeDetail: function (noticeId) {
            return $http.get(api + '/cp/notices/' + noticeId).then(function (result) {
                return result;
            });
        }


    };

    return noticeManager;
}]);
